﻿{extend name="layout/main-block" /}
{block name="sub-wrapper"}
<!--内容容器-->
<section id="sub-wrapper" class="full-screen page-sn">
    <!--数据展示容器-->
    <div id="sub-content">
        <div id="sub-header">
            <div class="sub-title"><h3><i class="fa fa-desktop"></i>运营管理--SN管理</h3></div>
            <div class="sub-tools">
                <div id="searchTool">
                    <form class="form-inline" >
                        <input size="30" class="form-control" id="phname" placeholder="请输入SN名称进行检索" />
                        <a class="btn btn-primary" id="searchname"><i class="fa fa-search"></i>搜索</a>
                        <a class="btn btn-success" id="delSearch"><i class="fa fa-search"></i>清空搜索</a>
                    </form>
                </div>
            </div>
            <div class="sub-import" style="margin-left: 20px">
                <a class="btn btn-info batchAdd"><i class="fa fa-file-excel-o"></i>导入</a>
            </div>
        </div>

        <div class="table-responsive data-table">
            <table class="table table-striped table-bordered table-hover">
                <thead>
                <tr>
                    <!-- <th class="text-center" width="34px">
                        <input type="checkbox" class="checkboxes" id="selectAll" />
                    </th> -->
                    <th>ID</th>
                    <!--<th>状态</th>-->
                    <th>SN</th>
                    <th>IMEI</th>
                    <th width="200px">同步时间</th>
                    <!-- <th>型号</th> -->
                    <th>代理组别</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name="sn" id="v" empty="$empty" }
                <tr>
                    <!-- <td class="text-center">
                        <input type="checkbox" class="checkboxes" name="checkbox[]" />
                    </td> -->
                    <td>{$v.id}</td>
                   <!-- {i-f cond---ition = "--$--v.status eq '0'"}
                    <td>未分配</td>
                    {e--ls--eif cond---ition = "--$--v.status eq '1'"}
                    <td>已分配</td>
                    {/if}-->
                    <td>{$v.sn}</td>
                    <td>{$v.imei}</td>
                    <td>{$v.sync_at}</td>
                    <!-- <td>{$v.mname}</td> -->
                    <td>{$v.fname}</td>
                    <td>
                        <ul class="record-tool">
                            <!--<li><a class="btn btn-info btn-sm handleRecord" data-name="{$v.id}">分配</a></li>-->
                            <li><a class="btn btn-warning btn-sm editRecord" data-name="{$v.id}">修改</a></li>

                        </ul>
                    </td>
                </tr>
                {/volist}

                </tbody>
                <tfoot>
                <tr>
                    <td colspan="1">
                        <ul class="record-tool">
                            <!--<li><a class="btn btn-info btn-sm" id="batchHandle"><i class="fa fa-check"></i>  分配</a></li>-->
                            <li><a class="btn btn-success btn-sm" id="addRecord"><i class="fa fa-plus"></i>  增加SN</a></li>
                            <!--<li><a class="btn btn-danger btn-sm" id="batchType"><i class="fa fa-plus"></i>  增加类型</a></li>-->
                        </ul>
                    </td>
                    <td colspan="2" class="">
                        {$page}
                        <!--<ul class="pagination">
                            <li>
                                <a href="#" aria-label="Previous">
                                    <span aria-hidden="true">&laquo;</span>
                                </a>
                            </li>
                            <li class="active"><a href="#">1</a></li>
                            <li><a href="#">2</a></li>
                            <li><a href="#">3</a></li>
                            <li><a href="#">4</a></li>
                            <li><a href="#">5</a></li>
                            <li><a href="#">...</a></li>
                            <li><a href="#">999</a></li>
                            <li>
                                <a href="#" aria-label="Next">
                                    <span aria-hidden="true">&raquo;</span>
                                </a>
                            </li>
                        </ul>-->
                    </td>
                    <td colspan="2" class="text-center">
                        <div class="table-summary">
                            <div class="input-group">
                                <div class="input-group-addon">到第</div>
                                <input type="text" class="form-control" id="goto" placeholder="" style="width:40px;">
                                <div class="input-group-addon">页</div>
                                <span class="input-group-btn">
                                    <a class="btn btn-primary" data-currentPage="{$currentPage}" data-lastPage="{$lastPage}" id="gotoPage"><i class="fa fa-arrow-right"></i>确定</a>
                                </span>
                            </div>
                        </div>
                    </td>
                    <td colspan="1" class="text-center">
                        共<span id="total-record" class="text-success fa-2x"> {$count} </span>条记录
                    </td>
                </tr>
                </tfoot>
            </table>
        </div>
        <div class="col-xs-12" id="edit-content">
        </div>
    </div>
</section>
{/block}

{block name="editRecord"}
<!--编辑工具-->
<div id="editRecord" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">账户ID:<span id="recordId"></span></h4>
            </div>
            <div class="modal-body">
                <div class="col-xs-12">
                    <form class="form-horizontal" name="editForm">
                        <!--<div class="form-group">
                            <label>状态</label>
                            <input type="radio" class="status s1" name="status"  value="1"> 已分配
                            <input type="radio" class="status s0" name="status"  value="0"> 未分配
                        </div>-->
                        <div class="form-group">
                            <label for="sn">SN</label>
                            <input type="text" class="form-control" id="sn" name="sn" >
                        </div>
                        <div class="form-group">
                            <label for="sn">IMEI</label>
                            <input type="text" class="form-control" id="imei" name="imei" >
                        </div>
                        <!-- <div class="form-group">
                            <label for="device_model_id">型号</label>
                            <select name="device_model_id" id="device_model_id" class="form-control">
                            {volist name="dmodel" id="m" empty="$empty" }
                            <option value="{$m.id}">{$m.name}</option>
                            {/volist}
                            </select>
                        </div> -->
                        <!--<div class="form-group">
                            <label for="franchiser_group_id">代理组别</label>
                            <select name="franchiser_group_id" id="franchiser_group_id" class="form-control">
                                {volist name="fgroup" id="f" empty="$empty" }
                                <option value="{$f.id}">{$f.name}</option>
                                {/volist}
                            </select>
                        </div>-->

                    </form>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="modal-footer">
                <a class="btn btn-warning" data-dismiss="modal"><i class="fa fa-times"></i>关闭</a>
            </div>
        </div>
    </div>
</div>
<!--编辑工具-->
{/block}


{block name="batchAdd"}
<!--编辑工具-->
<div id="batchAdd" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">导入文件</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" method="post" enctype="multipart/form-data" name="importForm">
                    <div class="row">
                        <div class="form-group col-xs-6">
                            <label>上传文件:</label>
                            <input type="file" id="fileUp" class="form-control" name="file">
                        </div>
                    </div>
                </form>
            </div>
            <div class="clearfix"></div>
            <div class="modal-footer">
                <a class="btn btn-warning" data-dismiss="modal"><i class="fa fa-times"></i>关闭</a>
            </div>
        </div>
    </div>
</div>
<!--编辑工具-->
{/block}


